export default {
  namespaced: true,
  state: {
    menu: null,
    tag: null,
    countList: [],
    isDetail: false,
  },
  mutations: {
    SET_MENU(state, str) {
      state.menu = str
    },
    SET_TAG(state, str) {
      state.tag = str
    },
    SET_COUNTLIST(state, arr) {
      state.countList = arr
    },
    SET_IS_DETAIL(state, boolean) {
      state.isDetail = boolean
    },
  },
  getters: {
    info(state) {
      const res = Object.assign(
        {},
        {
          menu: state.menu,
          tag: state.tag,
          countList: state.countList,
        }
      )
      return res
    },
  },
}
